package com.hotel.tv.application.admin.dto.order;

import com.autumn.application.dto.EntityDto;
import com.autumn.util.excel.annotation.ExcelColumn;
import com.autumn.validation.annotation.NotNullOrBlank;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;

/**
 * <p>
 * </p>
 *
 * @description TODO
 * @author: 老码农
 * @create: 2020-04-07 11:17
 **/
@Getter
@Setter
public class OrderDtoBase extends EntityDto<Long> {

    @ExcelColumn(order = 1, friendlyName = "订单号", width = 200)
    @Override
    public Long getId() {
        return super.getId();
    }

    /**
     * 订单标题
     */
    @NotNullOrBlank(message = "订单标题不能为空")
    @Length(max = 100, message = "订单标题过长")
    @ExcelColumn(order = 3, friendlyName = "订单标题", width = 300, isImportColumn = true, importNotNullable = true)
    private String title;
}
